package com.smart.campus.school.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smart.campus.school.mapper.AttendanceRecordValidMapper;
import com.smart.campus.school.domain.AttendanceRecordValid;
import com.smart.campus.school.service.IAttendanceRecordValidService;
import com.smart.campus.common.core.text.Convert;

/**
 * 有效打卡数据Service业务层处理
 * 
 * @author Zhihe.Li
 * @date 2021-01-03
 */
@Service
public class AttendanceRecordValidServiceImpl implements IAttendanceRecordValidService 
{
    @Autowired
    private AttendanceRecordValidMapper attendanceRecordValidMapper;

    /**
     * 查询有效打卡数据
     * 
     * @param id 有效打卡数据ID
     * @return 有效打卡数据
     */
    @Override
    public AttendanceRecordValid selectAttendanceRecordValidById(Long id)
    {
        return attendanceRecordValidMapper.selectAttendanceRecordValidById(id);
    }

    /**
     * 查询有效打卡数据列表
     * 
     * @param attendanceRecordValid 有效打卡数据
     * @return 有效打卡数据
     */
    @Override
    public List<AttendanceRecordValid> selectAttendanceRecordValidList(AttendanceRecordValid attendanceRecordValid)
    {
        return attendanceRecordValidMapper.selectAttendanceRecordValidList(attendanceRecordValid);
    }

    /**
     * 新增有效打卡数据
     * 
     * @param attendanceRecordValid 有效打卡数据
     * @return 结果
     */
    @Override
    public int insertAttendanceRecordValid(AttendanceRecordValid attendanceRecordValid)
    {
        return attendanceRecordValidMapper.insertAttendanceRecordValid(attendanceRecordValid);
    }

    /**
     * 修改有效打卡数据
     * 
     * @param attendanceRecordValid 有效打卡数据
     * @return 结果
     */
    @Override
    public int updateAttendanceRecordValid(AttendanceRecordValid attendanceRecordValid)
    {
        return attendanceRecordValidMapper.updateAttendanceRecordValid(attendanceRecordValid);
    }

    /**
     * 删除有效打卡数据对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAttendanceRecordValidByIds(String ids)
    {
        return attendanceRecordValidMapper.deleteAttendanceRecordValidByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除有效打卡数据信息
     * 
     * @param id 有效打卡数据ID
     * @return 结果
     */
    @Override
    public int deleteAttendanceRecordValidById(Long id)
    {
        return attendanceRecordValidMapper.deleteAttendanceRecordValidById(id);
    }
}
